package com.ruoyi.project.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.inspection.mapper.ViVehicleOrderMapper;
import com.ruoyi.project.inspection.domain.ViVehicleOrder;
import com.ruoyi.project.inspection.service.IViVehicleOrderService;

/**
 * 车辆年检预约订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-07-17
 */
@Service
public class ViVehicleOrderServiceImpl implements IViVehicleOrderService 
{
    @Autowired
    private ViVehicleOrderMapper viVehicleOrderMapper;

    /**
     * 查询车辆年检预约订单
     * 
     * @param id 车辆年检预约订单ID
     * @return 车辆年检预约订单
     */
    @Override
    public ViVehicleOrder selectViVehicleOrderById(Long id)
    {
        return viVehicleOrderMapper.selectViVehicleOrderById(id);
    }

    /**
     * 查询车辆年检预约订单列表
     * 
     * @param viVehicleOrder 车辆年检预约订单
     * @return 车辆年检预约订单
     */
    @Override
    public List<ViVehicleOrder> selectViVehicleOrderList(ViVehicleOrder viVehicleOrder)
    {
        return viVehicleOrderMapper.selectViVehicleOrderList(viVehicleOrder);
    }

    /**
     * 新增车辆年检预约订单
     * 
     * @param viVehicleOrder 车辆年检预约订单
     * @return 结果
     */
    @Override
    public int insertViVehicleOrder(ViVehicleOrder viVehicleOrder)
    {
        viVehicleOrder.setCreateTime(DateUtils.getNowDate());
        return viVehicleOrderMapper.insertViVehicleOrder(viVehicleOrder);
    }

    /**
     * 修改车辆年检预约订单
     * 
     * @param viVehicleOrder 车辆年检预约订单
     * @return 结果
     */
    @Override
    public int updateViVehicleOrder(ViVehicleOrder viVehicleOrder)
    {
        return viVehicleOrderMapper.updateViVehicleOrder(viVehicleOrder);
    }

    /**
     * 批量删除车辆年检预约订单
     * 
     * @param ids 需要删除的车辆年检预约订单ID
     * @return 结果
     */
    @Override
    public int deleteViVehicleOrderByIds(Long[] ids)
    {
        return viVehicleOrderMapper.deleteViVehicleOrderByIds(ids);
    }

    /**
     * 删除车辆年检预约订单信息
     * 
     * @param id 车辆年检预约订单ID
     * @return 结果
     */
    @Override
    public int deleteViVehicleOrderById(Long id)
    {
        return viVehicleOrderMapper.deleteViVehicleOrderById(id);
    }
}
